package cn.itcast.vo;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public class ErrorResult {

    private String code;

    private String message;

public static ErrorResult error(){
    return ErrorResult.builder().code("999999").message("系统异常").build();

}
public static ErrorResult add(){
    return ErrorResult.builder().code("000001").message("添加失败").build();

}
public static ErrorResult delete(){
    return ErrorResult.builder().code("000002").message("删除失败").build();

}
public static ErrorResult update(){
    return ErrorResult.builder().code("000003").message("修改失败").build();

}
public static ErrorResult select(){
    return ErrorResult.builder().code("000004").message("查询失败").build();

}






}
